home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 2
/
Amiga Tools 2.iso
/
tools
/
gedscripts
/
ispell
/
wordcheckcallback.ged
< prev
Wrap
Text File
|
1995-03-09
|
1KB
|
57 lines
/* WordCheckCallBack.ged --- calls GoldED after the user has made a (?) smart
* selection in the GUISpell window.
*
* Also done by R. Laederach
*
*
*
* "Snoop makes da call" <grin>
*
* Startup and Exit code by Dietmar Eilert, rest © 1994 by R. Laederach
*
*
*
*/
OPTIONS RESULTS /* enable return codes */
if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
address 'GOLDED.1'
'LOCK CURRENT' /* lock GUI, gain access */
OPTIONS FAILAT 6 /* ignore warnings */
SIGNAL ON SYNTAX /* ensure clean exit */
if ~show(ports, 'GUISpell') then do
UNLOCK
EXIT
end
parse arg testword item /* I the checking procedure to economize time */
/* As the user is locked away, I can do this */
OPTIONS RESULTS
ADDRESS "GUISpell"
currenttext
replacementword = RESULT /* That's what the user selected */
ADDRESS "GOLDED.1"
'PREVEND'
'REPLACE NEXT STRING="'|| testword||'" BY='||replacementword /* I had to hassle
'RIGHT' with the quotes */
'RIGHT' /* The cursor gets back to the right position */
'UNLOCK' /* VERY important: unlock GUI */
ADDRESS "GUISpell" EXIT
EXIT
SYNTAX:
SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
'UNLOCK'
EXIT